package br.com.agiledev.webscrum.action;

import org.jboss.seam.core.Expressions;
import org.jboss.seam.framework.EntityHome;

@SuppressWarnings("serial")
public class HomeAction<T> extends EntityHome<T> {

    @Override
    protected void initDefaultMessages() {
	Expressions expressions = new Expressions();
	if (getCreatedMessage() == null) {
	    setCreatedMessage(expressions.createValueExpression("#{messages.msgRegistroGravaSucesso}"));
	}
	if (getUpdatedMessage() == null) {
	    setUpdatedMessage(expressions.createValueExpression("#{messages.msgRegistroAtualizadoSucesso}"));
	}
	if (getDeletedMessage() == null) {
	    setDeletedMessage(expressions.createValueExpression("#{messages.msgRegistroExcluidoSucesso}"));
	}
    }

}
